/* ── Queer Salaam App v2 ──────────────────────────────────────────────────── */

:root {
  --bg:         #0a0a12;
  --surface:    #111120;
  --surface-2:  #1a1a2e;
  --border:     #22223a;
  --gold:       #f0b429;
  --gold-dim:   rgba(240,180,41,.18);
  --rose:       #f04f88;
  --rose-dim:   rgba(240,79,136,.18);
  --teal:       #30d5c8;
  --online:     #4ade80;
  --red:        #f05050;
  --text:       #f2ece4;
  --muted:      #6b6f8e;
  --nav-h:      62px;
  --top-h:      52px;
}

/* ── Reset ────────────────────────────────────────────────────────────────── */

.qs-app *, .qs-app *::before, .qs-app *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

/* ── App shell ────────────────────────────────────────────────────────────── */

.qs-app {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  z-index: 9999;
  overflow: hidden;
}

.qs-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: 8px;
}

/* ── Boot spinner ─────────────────────────────────────────────────────────── */

.qs-boot-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.qs-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: qs-spin 0.7s linear infinite;
  margin: 40px auto;
}

@keyframes qs-spin { to { transform: rotate(360deg); } }

/* ── Top bar ──────────────────────────────────────────────────────────────── */

.qs-top-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: var(--top-h);
  padding: 0 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.qs-brand {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.4px;
  background: linear-gradient(135deg, var(--gold), var(--rose));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.qs-top-sub {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.qs-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: color .15s, border-color .15s;
}

.qs-icon-btn:hover { color: var(--text); border-color: var(--gold); }
.qs-icon-btn svg { width: 18px; height: 18px; }

/* ── Bottom nav ───────────────────────────────────────────────────────────── */

.qs-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: var(--nav-h);
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.qs-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  position: relative;
  transition: color .15s;
  padding: 6px 0;
}

.qs-nav-btn svg { width: 22px; height: 22px; }
.qs-nav-btn span:not(.qs-nav-badge) { font-size: 10px; font-weight: 600; letter-spacing: .03em; }
.qs-nav-btn--active { color: var(--gold); }

.qs-nav-badge {
  position: absolute;
  top: 6px;
  right: calc(50% - 18px);
  min-width: 16px;
  height: 16px;
  border-radius: 99px;
  padding: 0 4px;
  background: var(--rose);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Browse grid ──────────────────────────────────────────────────────────── */

.qs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 2px;
  padding: 2px;
  background: var(--bg);
}

.qs-grid-loading {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding: 40px;
}

.qs-tile {
  aspect-ratio: 1;
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: none;
  cursor: pointer;
  display: block;
  padding: 0;
}

.qs-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.65) 0%, transparent 55%);
  pointer-events: none;
}

.qs-tile:hover .qs-tile-info,
.qs-tile:focus .qs-tile-info { opacity: 1; }

.qs-tile-online {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 10px;
  height: 10px;
  background: var(--online);
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,.5);
  z-index: 2;
}

.qs-tile-verified {
  position: absolute;
  top: 5px;
  left: 5px;
  background: var(--gold);
  color: #000;
  font-size: 9px;
  font-weight: 900;
  border-radius: 4px;
  padding: 1px 4px;
  z-index: 2;
}

.qs-tile-superlike {
  position: absolute;
  top: 5px;
  left: 5px;
  font-size: 12px;
  z-index: 2;
}

.qs-tile-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 18px 7px 8px;
  z-index: 2;
}

.qs-tile-intent {
  display: block;
  font-size: 9px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1.2;
  margin-bottom: 2px;
}

.qs-tile-name {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qs-tile-sub {
  font-size: 10px;
  color: var(--gold);
  font-weight: 600;
  margin-top: 2px;
}

/* ── Profile modal ────────────────────────────────────────────────────────── */

.qs-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0);
  z-index: 10000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transition: background .3s;
}

.qs-modal-backdrop--show {
  background: rgba(0,0,0,.75);
}

.qs-modal {
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.32,.72,0,1);
  overscroll-behavior: contain;
}

.qs-modal-backdrop--show .qs-modal {
  transform: translateY(0);
}

.qs-modal--sm .qs-modal {
  max-height: auto;
}

.qs-modal-photo {
  height: 300px;
  position: relative;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qs-modal-initial {
  font-size: 72px;
  font-weight: 900;
  color: rgba(255,255,255,.6);
}

.qs-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0,0,0,.55);
  border: none;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  z-index: 2;
}

.qs-modal-online {
  position: absolute;
  bottom: 14px;
  left: 14px;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  color: var(--online);
  font-size: 11px;
  font-weight: 700;
  border-radius: 99px;
  padding: 4px 10px;
}

.qs-modal-verified {
  position: absolute;
  bottom: 14px;
  right: 14px;
  background: var(--gold);
  color: #000;
  font-size: 11px;
  font-weight: 800;
  border-radius: 99px;
  padding: 4px 10px;
}

.qs-modal-body {
  padding: 20px 20px 32px;
}

.qs-modal-header h2 {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
}

.qs-modal-meta {
  color: var(--muted);
  font-size: 14px;
  margin-top: 4px;
}

.qs-intent-badge {
  display: inline-block;
  margin-top: 12px;
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid rgba(240,180,41,.3);
  border-radius: 99px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
}

.qs-modal-bio {
  margin-top: 14px;
  color: var(--text);
  line-height: 1.55;
  font-size: 14px;
}

.qs-modal-prompt {
  margin-top: 14px;
  padding: 12px 14px;
  border-left: 3px solid var(--rose);
  background: var(--surface-2);
  border-radius: 0 8px 8px 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  font-style: italic;
}

.qs-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.qs-chip {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 4px 10px;
  font-size: 12px;
  color: var(--muted);
}

/* ── Modal action buttons ─────────────────────────────────────────────────── */

.qs-modal-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 22px 0 8px;
}

.qs-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid;
  background: transparent;
  cursor: pointer;
  transition: transform .15s, background .15s;
  flex-shrink: 0;
}

.qs-action-btn:active { transform: scale(.92); }
.qs-action-btn svg { width: 22px; height: 22px; }

.qs-action-pass {
  width: 52px; height: 52px;
  border-color: rgba(240,80,80,.4);
  color: var(--red);
}
.qs-action-pass:hover { background: rgba(240,80,80,.15); }

.qs-action-like {
  width: 68px; height: 68px;
  border-color: var(--rose);
  color: var(--rose);
  border-width: 2.5px;
}
.qs-action-like svg { width: 28px; height: 28px; }
.qs-action-like:hover { background: var(--rose-dim); }

.qs-action-superlike {
  width: 52px; height: 52px;
  border-color: rgba(240,180,41,.4);
  color: var(--gold);
}
.qs-action-superlike:hover { background: var(--gold-dim); }

.qs-action-report {
  width: 44px; height: 44px;
  border-color: var(--border);
  color: var(--muted);
}
.qs-action-report:hover { border-color: var(--muted); }

/* ── Conversation list ────────────────────────────────────────────────────── */

.qs-conv-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  text-align: left;
  cursor: pointer;
  width: 100%;
  color: var(--text);
  transition: background .12s;
}

.qs-conv-row:hover { background: var(--surface); }

.qs-conv-photo {
  position: relative;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface-2);
}

.qs-conv-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.qs-conv-initial {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 900;
  color: rgba(255,255,255,.7);
}

.qs-conv-online {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 13px;
  height: 13px;
  background: var(--online);
  border-radius: 50%;
  border: 2px solid var(--bg);
}

.qs-conv-info { flex: 1; min-width: 0; }

.qs-conv-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 3px;
}

.qs-conv-name {
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qs-conv-time {
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
}

.qs-conv-preview {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qs-conv-badge {
  flex-shrink: 0;
  min-width: 20px;
  height: 20px;
  border-radius: 99px;
  padding: 0 5px;
  background: var(--rose);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Chat view ────────────────────────────────────────────────────────────── */

.qs-chat-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--top-h);
  padding: 0 14px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.qs-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  border-radius: 8px;
  transition: background .12s;
  flex-shrink: 0;
}

.qs-back-btn:hover { background: var(--surface); }
.qs-back-btn svg { width: 22px; height: 22px; }

.qs-chat-title {
  font-weight: 700;
  font-size: 16px;
}

.qs-chat-messages {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  min-height: calc(100vh - var(--top-h) - var(--nav-h) - 64px);
}

.qs-msg {
  display: flex;
  flex-direction: column;
  max-width: 78%;
}

.qs-msg--mine  { align-self: flex-end;  align-items: flex-end; }
.qs-msg--theirs{ align-self: flex-start; align-items: flex-start; }

.qs-msg-bubble {
  padding: 10px 14px;
  border-radius: 18px;
  word-break: break-word;
  line-height: 1.45;
  font-size: 15px;
}

.qs-msg--mine   .qs-msg-bubble { background: var(--rose); color: #fff; border-bottom-right-radius: 4px; }
.qs-msg--theirs .qs-msg-bubble { background: var(--surface-2); color: var(--text); border-bottom-left-radius: 4px; }

.qs-msg-time {
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
  padding: 0 4px;
}

.qs-chat-form {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.qs-chat-form input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 10px 16px;
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color .15s;
}

.qs-chat-form input:focus { border-color: var(--rose); }

.qs-send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--rose);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform .1s, opacity .1s;
}

.qs-send-btn:hover  { opacity: .88; }
.qs-send-btn:active { transform: scale(.92); }
.qs-send-btn svg { width: 18px; height: 18px; }

/* ── Profile editor ───────────────────────────────────────────────────────── */

.qs-profile-editor {
  padding: 20px 16px 40px;
  max-width: 600px;
  margin: 0 auto;
}

.qs-photo-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.qs-profile-photo-preview {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
}

.qs-profile-photo-placeholder {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.qs-profile-photo-placeholder svg { width: 44px; height: 44px; }

.qs-photo-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: border-color .15s, color .15s;
}

.qs-photo-label:hover { border-color: var(--gold); color: var(--gold); }
.qs-photo-label svg { width: 16px; height: 16px; }

.qs-form { display: grid; gap: 14px; }

.qs-field {
  display: grid;
  gap: 5px;
}

.qs-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.qs-field label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.qs-field input,
.qs-field textarea,
.qs-field select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 13px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  width: 100%;
  outline: none;
  transition: border-color .15s;
}

.qs-field input:focus,
.qs-field textarea:focus,
.qs-field select:focus { border-color: var(--rose); }

.qs-field textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
.qs-field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b6f8e' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */

.qs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 46px;
  padding: 0 22px;
  border-radius: 12px;
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: opacity .15s, transform .1s;
  font-family: inherit;
}

.qs-btn:active { transform: scale(.97); }

.qs-btn--primary {
  background: linear-gradient(135deg, var(--rose), #c0365e);
  color: #fff;
}

.qs-btn--outline {
  background: transparent;
  color: var(--gold);
  border: 1.5px solid rgba(240,180,41,.4);
}

.qs-btn--gold {
  background: linear-gradient(135deg, var(--gold), #d4921e);
  color: #000;
}

.qs-btn--full { width: 100%; }
.qs-btn--sm { height: 38px; padding: 0 16px; font-size: 13px; border-radius: 10px; }

/* ── Privacy toggles ──────────────────────────────────────────────────────── */

.qs-privacy-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.qs-privacy-section h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.qs-toggle-row {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.qs-toggle-row strong { display: block; font-size: 14px; color: var(--text); font-weight: 600; }
.qs-toggle-row small  { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

.qs-toggle {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 26px;
  appearance: none;
  background: var(--border);
  border-radius: 99px;
  cursor: pointer;
  transition: background .2s;
}

.qs-toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s;
}

.qs-toggle:checked { background: var(--rose); }
.qs-toggle:checked::after { transform: translateX(18px); }

.qs-logout-link {
  display: block;
  text-align: center;
  margin-top: 32px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.qs-logout-link:hover { color: var(--red); }

/* ── Form status ──────────────────────────────────────────────────────────── */

.qs-form-status {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  min-height: 18px;
  margin-top: 2px;
}

.qs-form-status--ok  { color: var(--online); }
.qs-form-status--err { color: var(--red); }

/* ── Empty state ──────────────────────────────────────────────────────────── */

.qs-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 24px;
  text-align: center;
  color: var(--muted);
  grid-column: 1 / -1;
}

.qs-empty-icon { font-size: 44px; }

.qs-empty-state h3 { font-size: 20px; font-weight: 700; color: var(--text); }
.qs-empty-state p  { font-size: 14px; max-width: 300px; line-height: 1.5; }

/* ── Report modal ─────────────────────────────────────────────────────────── */

.qs-report-reasons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 14px 0;
}

.qs-reason-btn {
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: border-color .12s;
}

.qs-reason-btn:hover { border-color: var(--rose); color: var(--rose); }

/* ── Match celebration ────────────────────────────────────────────────────── */

.qs-match-celebrate {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.85);
  z-index: 20000;
  padding: 24px;
}

.qs-match-card {
  background: var(--surface);
  border-radius: 22px;
  padding: 40px 28px 32px;
  text-align: center;
  max-width: 340px;
  width: 100%;
  border: 1px solid var(--border);
}

.qs-match-hearts {
  font-size: 44px;
  margin-bottom: 16px;
  animation: qs-heartbeat .6s ease-in-out;
}

@keyframes qs-heartbeat {
  0%,100% { transform: scale(1); }
  40%      { transform: scale(1.25); }
}

.qs-match-card h2 {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold), var(--rose));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.qs-match-card p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 22px;
}

.qs-match-card .qs-btn { margin-top: 8px; }

/* ── Toasts ───────────────────────────────────────────────────────────────── */

.qs-toast {
  position: fixed;
  bottom: calc(var(--nav-h) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  opacity: 0;
  transition: opacity .25s, transform .25s;
  z-index: 30000;
  pointer-events: none;
  white-space: nowrap;
  font-family: inherit;
}

.qs-toast--show { opacity: 1; transform: translateX(-50%) translateY(0); }
.qs-toast--success { background: #1a7c42; }
.qs-toast--error   { background: #9c2424; }
.qs-toast--info    { background: #1e3a8a; }

/* ── Login screen ─────────────────────────────────────────────────────────── */

.qs-login-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  min-height: 80vh;
  gap: 16px;
}

.qs-login-logo {
  font-size: 52px;
  font-weight: 900;
  letter-spacing: -2px;
  background: linear-gradient(135deg, var(--gold), var(--rose));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 4px;
}

.qs-login-tagline {
  font-size: 15px;
  color: var(--muted);
  max-width: 280px;
  line-height: 1.55;
}

.qs-login-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 300px;
  margin-top: 8px;
}

/* ── Responsive tweaks ────────────────────────────────────────────────────── */

@media (min-width: 480px) {
  .qs-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}

@media (min-width: 768px) {
  .qs-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .qs-modal { border-radius: 22px; }
  .qs-modal-backdrop { align-items: center; }
}

@media (min-width: 1024px) {
  .qs-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

/* ── Membership / Subscription ────────────────────────────────────────────── */

.qs-membership-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.qs-membership-section h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
}

.qs-membership-section > p {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 16px;
}

.qs-current-plan {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.qs-current-plan--free {
  background: rgba(107,111,142,.2);
  color: var(--muted);
  border: 1px solid var(--border);
}

.qs-current-plan--plus {
  background: rgba(240,180,41,.15);
  color: var(--gold);
  border: 1px solid rgba(240,180,41,.35);
}

.qs-current-plan--premium {
  background: rgba(240,79,136,.15);
  color: var(--rose);
  border: 1px solid rgba(240,79,136,.35);
}

.qs-plan-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.qs-plan-card {
  border-radius: 16px;
  padding: 18px 20px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: border-color .15s, transform .1s;
  position: relative;
  overflow: hidden;
}

.qs-plan-card:active { transform: scale(.985); }

.qs-plan-card--plus {
  border-color: rgba(240,180,41,.35);
}

.qs-plan-card--plus:hover {
  border-color: rgba(240,180,41,.7);
}

.qs-plan-card--premium {
  border-color: rgba(240,79,136,.35);
}

.qs-plan-card--premium:hover {
  border-color: rgba(240,79,136,.7);
}

.qs-plan-card--current {
  opacity: .5;
  cursor: default;
  pointer-events: none;
}

.qs-plan-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.qs-plan-name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.2px;
}

.qs-plan-card--plus  .qs-plan-name { color: var(--gold); }
.qs-plan-card--premium .qs-plan-name { color: var(--rose); }

.qs-plan-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.qs-plan-price span {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}

.qs-plan-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.qs-plan-features li {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
}

.qs-plan-features li::before {
  content: '✓';
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

.qs-plan-card--plus  .qs-plan-features li::before { color: var(--gold); }
.qs-plan-card--premium .qs-plan-features li::before { color: var(--rose); }

.qs-plan-cta {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 11px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  border: none;
  cursor: pointer;
  transition: opacity .15s;
}

.qs-plan-cta:disabled {
  opacity: .4;
  cursor: default;
}

.qs-plan-card--plus  .qs-plan-cta {
  background: linear-gradient(135deg, var(--gold), #d4921e);
  color: #000;
}

.qs-plan-card--premium .qs-plan-cta {
  background: linear-gradient(135deg, var(--rose), #c0365e);
  color: #fff;
}

.qs-manage-sub-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 11px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  transition: border-color .15s, color .15s;
}

.qs-manage-sub-btn:hover {
  border-color: var(--muted);
  color: var(--text);
}

/* ── Scrollbar ────────────────────────────────────────────────────────────── */

.qs-content::-webkit-scrollbar { width: 4px; }
.qs-content::-webkit-scrollbar-track { background: transparent; }
.qs-content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
