.hidden { display: none !important; }
* { box-sizing: border-box; margin: 0; }
button { font-family: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
input, textarea { font-family: inherit; font-size: 16px; }

.btn {
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-width: var(--touch);
  transition: transform var(--motion), box-shadow var(--motion), background var(--motion), border-color var(--motion);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn-primary {
  background: linear-gradient(180deg, var(--accent-bright) 0%, var(--accent) 100%);
  color: #041016;
  box-shadow: var(--shadow-sm), 0 0 0 1px rgba(0, 212, 238, 0.2);
}
.btn-primary:hover { box-shadow: var(--shadow-md), 0 0 24px rgba(0, 212, 238, 0.2); }
.btn-secondary {
  background: var(--accent-muted);
  color: var(--accent-bright);
  border: 1px solid rgba(0, 212, 238, 0.35);
}
.btn-secondary:hover { background: rgba(0, 212, 238, 0.22); border-color: rgba(0, 212, 238, 0.5); }
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
}
.btn-ghost:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.btn-danger { background: var(--error); color: #fff; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 13px; border-radius: var(--radius-sm); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }
.btn-icon {
  width: var(--touch);
  height: var(--touch);
  min-width: var(--touch);
  padding: 0;
  border-radius: var(--radius-md);
  background: var(--surface-raised);
  color: var(--text);
  border: 1px solid var(--border);
}

.input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  transition: border-color var(--motion), box-shadow var(--motion);
}
.input::placeholder { color: var(--muted); }
.input:focus {
  outline: none;
  border-color: rgba(0, 212, 238, 0.5);
  box-shadow: 0 0 0 3px rgba(0, 212, 238, 0.12);
}
.input-label { font-size: 13px; font-weight: 500; color: var(--text-secondary); margin-bottom: 6px; display: block; }

.chip {
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  background: var(--surface-raised);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: background var(--motion), color var(--motion), border-color var(--motion);
}
.chip.selected {
  background: var(--accent-muted);
  color: var(--accent-bright);
  border-color: rgba(0, 212, 238, 0.35);
}
.chip.locked { opacity: 0.55; }

.badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}
.badge-promo { background: rgba(232, 121, 249, 0.2); color: var(--accent-alt); border: 1px solid rgba(232, 121, 249, 0.35); }
.badge-online { background: rgba(48, 209, 88, 0.15); color: var(--success); }
.badge-offline { background: var(--surface-raised); color: var(--muted); }

.progress-unlock { margin: var(--space-3) 0; }
.progress-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
  border-radius: inherit;
  transition: width var(--motion);
}
.progress-label { font-size: 13px; color: var(--muted); margin-top: var(--space-2); }
.progress-label strong { color: var(--accent-bright); font-weight: 600; }

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(145deg, #2a2a32, #1a1a1f);
  border: 1px solid var(--border);
  position: relative;
  flex-shrink: 0;
}
.avatar.sm { width: 32px; height: 32px; }
.avatar .online {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background: var(--success);
  border: 2px solid var(--surface);
  border-radius: 50%;
}

.toast {
  position: fixed;
  top: max(12px, env(safe-area-inset-top, 12px));
  left: 50%;
  max-width: min(calc(100% - 32px), 400px);
  padding: 14px 18px;
  background: var(--glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  font-size: 14px;
  box-shadow: var(--shadow-md);
  z-index: 900;
}

.modal-scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 800;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.modal-scrim.open { display: flex; }
.sheet {
  width: 100%;
  max-width: none;
  max-height: 80dvh;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: var(--space-5);
  overflow-y: auto;
  box-shadow: var(--shadow-md);
  will-change: transform;
}
.sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--border-strong);
  border-radius: var(--radius-full);
  margin: 0 auto var(--space-4);
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4);
  background: transparent;
  border-bottom: 1px solid var(--border);
  min-height: var(--touch);
  color: var(--text);
  text-decoration: none;
  font-size: 16px;
  transition: background var(--motion);
}
.settings-row:hover { background: var(--surface-raised); }
.settings-group {
  border-radius: var(--radius-card);
  overflow: hidden;
  margin-bottom: var(--space-4);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.back-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  min-height: 52px;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}
.back-header button {
  background: none;
  border: none;
  color: var(--accent-bright);
  font-size: 15px;
  font-weight: 500;
}
